#include "ospotlight.h"

OSpotLight::OSpotLight(QObject *parent) :
    OLight(parent)
{
    setLightType(SPOT);
}

float OSpotLight::innerAng() const
{
    return m_innerAng;
}

float OSpotLight::outerAng() const
{
    return m_outerAng;
}

float OSpotLight::fallOff() const
{
    return m_fallOff;
}

void OSpotLight::setInnerAng(float ang)
{
    m_innerAng = ang;
    if (m_light == 0) return;
    m_light->setSpotlightInnerAngle(Ogre::Degree(m_innerAng));
}

void OSpotLight::setOuterAng(float ang)
{
    m_outerAng = ang;
    if (m_light == 0) return;
    m_light->setSpotlightOuterAngle(Ogre::Degree(m_outerAng));
}

void OSpotLight::setFallOff(float ang)
{
    m_fallOff = ang;
    if (m_light == 0) return;
    m_light->setSpotlightFalloff(m_fallOff);
}
